/*
 *  $Id: NagaPrincess.cs 1051 2010-05-18 22:10:41Z thenn.erannor $
 *	This file is a part of Ragima CCG.
 *	(C) 2008 Ragima development group.
 *
 *	Licensed under the terms of the GNU GPL License version 2.
 *
 */

namespace Ragima.Cards001.Earth.Creatures {
    public class NagaPrincess: CreatureCard {
        public NagaPrincess(): base("001_e_c_naga_princess") {
            Level = CompleteLevel.ReadyForTest;
            Element = ElementType.Earth;
            Value = 100;
            SetRace<Races.Naga>();
            Damage = 2;
            Health = 5;
			AddManaCost(ElementType.Earth, 6);
        }
        public override void SetNaturalAffects(ICollector<Affect> affects) {
            affects.Add(new Affects.VenomAttack(1));
            affects.Add(new NagaPrincessAura());
        }

        private class NagaPrincessAura: PackAuraAffect {
            public NagaPrincessAura(): base(RaceManager.GetRace<Races.Naga>()) {}

            public override string Id {
                get { return AffectManager.GetCardId<NagaPrincess>("aura"); }
            }

            protected override Affect CreateSubAffect() {
                return new NagaPrincessAffect();
            }
        }

        private class NagaPrincessAffect: SpellAffect<NagaPrincess> {
            public NagaPrincessAffect() {
                Add(new Affects.Brutal());
                Add(new Affects.OnHit(DoHit, AffectSummaryType.Local));
            }

            private static void DoHit(Creature hitter, AbstractObject target, int damage) {
                if (target is Creature) hitter.Summary.ChangeDamage(1);
            }
        }
    }
}
